class Solution:
    def countGoodSubstrings(self, s: str) -> int:
        size = len(s)
        ans = 0
        for i in range(size - 2):
            if s[i] == s[i + 1] or s[i] == s[i + 2] or s[i + 1] == s[i + 2]:
                continue
            else:
                ans += 1
        return ans


if __name__ == "__main__":
    print(Solution().countGoodSubstrings("xyzzaz"))  # 1
    print(Solution().countGoodSubstrings("aababcabc"))  # 4
